package com.starlight.flower_server.domain.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starlight.flower_server.domain.TotalData;
import com.starlight.flower_server.domain.item.cqrs.ItemPageQuery;
import com.starlight.flower_server.domain.item.cqrs.ItemPageQueryByCategoryId;
import com.starlight.flower_server.domain.item.data.ItemData;
import com.starlight.flower_server.infrastructure.entity.Item;

import java.util.List;

/**
 * @Author yfy2001
 * @date 2023/4/5 15:09
 */
public interface ItemService {

    Item queryItemDetailById(Long id);

    Integer logicDeleteItemById(Long id);

    Integer insertItem(Item item);

    Integer modifyItem(Item item);

    IPage<ItemData> queryItemList(ItemPageQuery query);

    TotalData<ItemData> queryAllItemData();

    TotalData<ItemData> queryItemTotalCount();

    List<ItemData> queryRandomItemList(Integer count);

    List<ItemData> queryItemListByCategoryId(Long categoryId);

    IPage<ItemData> queryItemPageByCategoryId(ItemPageQueryByCategoryId query);
}
